import request from '@/util/request'

// 是否被注册
export function checkUserName(userName) {
  return request({
    url: '/register/check.json',
    method: 'get',
    params: { userName },
    baseURL: process.env.VUE_APP_AJS_USER
  })
}

export function checkCompanyName(userName) {
  return request({
    url: `/register/check/${userName}.json`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_USER
  })
}

export function listProtocol() {
  return request({
    url: '/aqs/protocol/register/list.json',
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_OTHER
  })
}

export function protocolDetail(id) {
  return request({
    url: `/aqs/protocol/register/detail/${id}.json`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_OTHER
  })
}
